home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / graphics / tiff / libtiff / prototypes.h < prev    next >
Text File  |  1992-02-18  |  3KB  |  61 lines

  1. /* $Header: /d/sam/tiff/libtiff/RCS/prototypes.h,v 1.8 92/02/18 18:20:08 sam Exp $ */
  2.  
  3. /*
  4.  * Copyright (c) 1991, 1992 Sam Leffler
  5.  * Copyright (c) 1991, 1992 Silicon Graphics, Inc.
  6.  *
  7.  * Permission to use, copy, modify, distribute, and sell this software and 
  8.  * its documentation for any purpose is hereby granted without fee, provided
  9.  * that (i) the above copyright notices and this permission notice appear in
  10.  * all copies of the software and related documentation, and (ii) the names of
  11.  * Sam Leffler and Silicon Graphics may not be used in any advertising or
  12.  * publicity relating to the software without the specific, prior written
  13.  * permission of Sam Leffler and Silicon Graphics.
  14.  * 
  15.  * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
  16.  * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
  17.  * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
  18.  * 
  19.  * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
  20.  * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
  21.  * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
  22.  * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
  23.  * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
  24.  * OF THIS SOFTWARE.
  25.  */
  26.  
  27. #if USE_PROTOTYPES
  28. #define    DECLARE1(f,t1,a1)        f(t1 a1)
  29. #define    DECLARE2(f,t1,a1,t2,a2)        f(t1 a1, t2 a2)
  30. #define    DECLARE3(f,t1,a1,t2,a2,t3,a3)    f(t1 a1, t2 a2, t3 a3)
  31. #define    DECLARE4(f,t1,a1,t2,a2,t3,a3,t4,a4)\
  32.     f(t1 a1, t2 a2, t3 a3, t4 a4)
  33. #define    DECLARE5(f,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5)\
  34.     f(t1 a1, t2 a2, t3 a3, t4 a4, t5 a5)
  35. #define    DECLARE6(f,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6)\
  36.     f(t1 a1, t2 a2, t3 a3, t4 a4, t5 a5, t6 a6)
  37. #define    DECLARE1V(f,t1,a1)        f(t1 a1 ...)
  38. #define    DECLARE2V(f,t1,a1,t2,a2)    f(t1 a1, t2 a2, ...)
  39. #define    DECLARE3V(f,t1,a1,t2,a2,t3,a3)    f(t1 a1, t2 a2, t3 a3, ...)
  40. #else
  41. #define    DECLARE1(f,t1,a1)        f(a1) t1 a1;
  42. #define    DECLARE2(f,t1,a1,t2,a2)        f(a1,a2) t1 a1; t2 a2;
  43. #define    DECLARE3(f,t1,a1,t2,a2,t3,a3)    f(a1, a2, a3) t1 a1; t2 a2; t3 a3;
  44. #define    DECLARE4(f,t1,a1,t2,a2,t3,a3,t4,a4) \
  45.     f(a1, a2, a3, a4) t1 a1; t2 a2; t3 a3; t4 a4;
  46. #define    DECLARE5(f,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5)\
  47.     f(a1, a2, a3, a4, a5) t1 a1; t2 a2; t3 a3; t4 a4; t5 a5;
  48. #define    DECLARE6(f,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6)\
  49.     f(a1, a2, a3, a4, a5, a6) t1 a1; t2 a2; t3 a3; t4 a4; t5 a5; t6 a6;
  50. #if USE_VARARGS
  51. #define    DECLARE1V(f,t1,a1) \
  52.     f(a1, va_alist) t1 a1; va_dcl
  53. #define    DECLARE2V(f,t1,a1,t2,a2) \
  54.     f(a1, a2, va_alist) t1 a1; t2 a2; va_dcl
  55. #define    DECLARE3V(f,t1,a1,t2,a2,t3,a3) \
  56.     f(a1, a2, a3, va_alist) t1 a1; t2 a2; t3 a3; va_dcl
  57. #else
  58. "Help, I don't know how to handle this case: !USE_PROTOTYPES and !USE_VARARGS?"
  59. #endif
  60. #endif
  61.